<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="moduleList" />
<script
	src="${staticPath}/lib/datetimepicker/0.0.11/js/bootstrap-datetimepicker.min.js"
	type="text/javascript"></script>
<script
	src="${staticPath}/lib/datetimepicker/0.0.11/js/locales/bootstrap-datetimepicker.zh-CN.js"
	type="text/javascript"></script>
<script src="${staticPath}/lib/accounting/0.3.2/accounting.min.js"
	type="text/javascript"></script>

<script type="text/javascript">
	$(document).ready(
			function() {
				$(".o-a-form-date").datetimepicker({
					language : 'zh-CN',
					autoclose : true,
					minView : 2,
					todayBtn : 1,
					pickerPosition : "bottom-left"
				});
				$('[data-accounting]')
				.each(function() {
							var $this = $(this);
							if ($this.attr("data-accounting-precision")
									&& "" != $this.attr("data-accounting-precision")) {
								$this.html(accounting.formatMoney(
														$this.attr("data-accounting"),"¥ ",
														$this.attr("data-accounting-precision") * 1));
							} else {
								$this.html(accounting.formatMoney($this
																.attr("data-accounting"),"¥ "));
							}
						});
				$('#btnSelect').click(
						function() {
							window.open(
									'${contextPath}/statement/stm/payinslip/getByPayinSlip?'
											+ $('#payinslipForm').serialize(),
									'_self');
						});
			});
</script>

</head>
<body>
<form:form name="listForm" modelAttribute="statementReceiveNote" method="post" class="form-inline" role="form">
	    <input type="hidden" name="deleteIds" >
		<ol class="breadcrumb map_1">
			<li><a href="${contextPath}/index">首页</a></li>
			<li><a href="${contextPath}/biz/example/form/elements?navId=${navId}">结算对账</a></li>
			<li class="active">验收单/退货单</li>
		</ol>
		<div class="o-l-search-builder f_1">
	         <div id="statement-search-builder" class="collapse" style="height:auto;">	
	         </div>
	         <div class="f_2">
	                   <div class="form-group col-sm-6">
	                      <label for="billType" class="col-sm-3 control-label f_7">收货单类型：</label>
	                      <div class="col-sm-9 f_6">
	                         <ossp:select dictType="RECEIVE_MVK_TYPE" class_="f_5" id="billType" name="billType"></ossp:select>
	                      </div>
	                  </div>
	                  <div class="form-group col-sm-6">
	                      <label for="receiptDate" class="col-sm-3 control-label f_4">收货日期：</label>
	                      <div class="col-sm-9 f_6">
	                        <div class="input-group date o-a-form-datetime" data-date=""  data-date-format="yyyy-mm-dd">
	                            <input class="form-control f_13" type="text" readonly id="receiptDate" name="receiptDate"/>
	                            <span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                            <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
	                        </div>
	                      </div>
	                  </div>
	             </div> 
	         <div class="f_8">
	              <div class="f_2">
	                  <div class="col-sm-8 f_6">
	                       <form:input id="billNo" path="billNo" class="f_5" placeholder="验收单号"/>
	                  </div>
	                  <button type="submit" class="btn btn-warning btn_1">查&nbsp;询</button>
	             </div>
	         </div>
	     </div>
		<tags:message content="${message}"/>
		<div class="o-l-search-builder f_9">
			<table class="table table-striped table-hover o-l-table table-bordered" id="table1">
				<thead class="t_1">
					<tr>
						<th style="width: 1px"><input type="checkbox" data-ckb="all"></th>
						<th>验收单号</th>
						<th>单据类型</th>
						<th>订单号</th>
						<th>收货日期</th>
						<th>收货人</th>
						<th>供应商编码</th>
						<th>总金额</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${page.list}" var="receive">
						<tr data-herf="${contextPath}/biz/statement/statementReceiveNote/${receive.id}/view?billNo=${receive.billNo}"
							data-target="_self">
							<td class="o-l-tab-ckb">
								<input type="checkbox" data-ckb-id="${receive.id}">
							</td>
							<td>${receive.billNo}</td>
							<td><ossp:value dictType="RECEIVE_MVK_TYPE" key="${receive.billType}"></td>
							<td>${receive.poNum}</ossp:value></td>
							<td><fmt:formatDate value="${receive.receiptDate}" pattern="yyyy-MM-dd"/></td>
							<td>${receive.receiptName}</td>
							<td>${receive.supplierNo}</td>
							<td>${receive.amount}</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
        </div>
		 <pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}" url="" total="${page.total}"/>
		<script type="text/javascript" src="${staticPath}/js/list.js"></script>
		</form:form>
		<script type="text/javascript">
	$('.o-a-form-datetime').datetimepicker({
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
		autoclose: 1,
		todayHighlight: 1,
		startView: 2,
		minView: 2,
		forceParse: 0,
		format: 'yyyy-mm-dd'
    });

</script>
  
</body>
</html>